package services;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;

public class Command {
    //Static type list of clinets and single default host
    public static List<Host> clientList = new ArrayList<Host>();
    public static Host def;
    private String command;

    public enum ClientType {
        /*
         * SERVER - typ dla serwera aplikacji
         * CLINET - typ dla klienta aplikacji
         */

        SERVER, CLIENT;
        private String ClientType;

        private ClientType() {
            this.ClientType = ClientType;
        }

        public String getClientType() {
            return ClientType;
        }
    };

    public enum MessageType {
        /*
         * RESPONSE - odpowiedź
         * REQUEST - żądanie
         * INFO - informacja
         */

        RESPONSE, REQUEST, INFO;
        private String MessageType;
	private MessageType() {
            this.MessageType = MessageType;
        }

        public String getMessageType() {
            return MessageType;
        }
    }

    public enum Include {
        /*
         * FILE - plik
         * JSON - przesyłanie żądanych plików
         * INFO - informacja
         */

        FILE, JSON, INFO;
        private String Include;

        /**
         * @return the Include
         */
        public String getInclude() {
            return Include;
        }

        /**
         * @param Include the Include to set
         */
        public void setInclude(String Include) {
            this.Include = Include;
        }
    }

    public enum ResponseCode {
        /*
         * OK - komenda ok
         * DATA - uruchomienie pliku, otwieranie łącza danych
         * NODATA - nie można otworzyć łącza danych
         * SYNTAX - błąd składniowy
         * NOINFO - brak informacji o hoście
         */

        OK, DATA, NODATA, SYNTAX, NOINFO, OPEN, QUIT;
        private String ResponseCode;

        /**
         * @return the ResponseCode
         */
        public String getResponseCode() {
            return ResponseCode;
        }

        /**
         * @param ResponseCode the ResponseCode to set
         */
        public void setResponseCode(String ResponseCode) {
            this.ResponseCode = ResponseCode;
        }
    }

    public static enum Action{
        PUT(1),GET(2);
        private int Action;

        /**
         * @return the Action
         */
        public int getAction() {
            return Action;
        }

        /**
         * @param Action the Action to set
         */
        private Action(int Action) {
            this.Action = Action;
        }
    }
    public String getCommand() {
        return command;
    }

    public void setCommand(String command) {
        this.command = command;
    }

    
}
